/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package codigo;

import java.io.File;

/**
 *
 * @author kata
 */
public class Compilador_while {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String path = "src\\codigo\\Lexer.lex";
        generarLexer(path);       
        
        String opciones[] = new String[5];
        opciones[0] = "-destdir";
        opciones[1] = "src\\codigo";
        opciones[2] = "-parser";
        opciones[3] = "parser";
        opciones[4] = "src\\codigo\\Sintactico.cup";

        try {
            java_cup.Main.main(opciones);
        } catch (Exception e) {
            System.out.print(e);
        }
        
    }
    public static void generarLexer(String path){
        File file=new File(path);
        jflex.Main.generate(file);        
    }
    
    
    
}
